package com.zut.service.impl;

import javax.servlet.http.HttpServletRequest;

import com.zut.dao.UserDao;
import com.zut.dao.impl.UserDaoImpl;
import com.zut.entity.User;
import com.zut.service.UserService;

public class UserServiceImpl implements UserService{

	UserDao userdao = new UserDaoImpl();
	@Override
	public boolean login(String name, String pwd, HttpServletRequest request) {
		
		User user = userdao.getUser(name, pwd);
		if (user!=null) {
			request.getSession().setAttribute("user", user);
			return true;
		}
		
		
		return false;
	}

}
